import tester.*;

class Examples{
	
	
	Checker check1 = new Checker(new AgeChecker (40, false), new GenChecker(true), new TimeChecker());
	Checker check2 = new Checker(new AgeChecker(), new GenChecker(false), new TimeChecker(180, false));
	Checker check3 = new Checker(new AgeChecker(40, false), new GenChecker(), new TimeChecker(180, false));
	
	Runner fail1check1 = new Runner("Bob", 50, 455, 40, 60, true);
	Runner fail2check1 = new Runner("Bob", 60, 455, 40, 60, true);
	Runner pass1check1 = new Runner("Bob", 20, 455, 40, 60, true);
	Runner pass2check1 = new Runner("Bob", 39, 455, 40, 60, true);
	
	
	
	Ilor mt = new Mtlor();
	
	Ilor list1 = new Conslor(fail1check1, mt);
	Ilor list2 = new Conslor(pass1check1, mt);
	Ilor list3 = new Conslor(pass1check1, new Conslor(pass2check1, new Conslor(fail1check1, mt)));
	Ilor list3expect = new Conslor(pass1check1, new Conslor(pass2check1, mt));
	
	boolean testCheck(Tester t){
		return t.checkExpect(list1.checkLorForOneCase(check1), false) &&
			   t.checkExpect(list2.checkLorForOneCase(check1), true) &&
			   t.checkExpect(list3.checkLorForOneCase(check1), true);
	}
	
	boolean testCount(Tester t){
		return t.checkExpect(list1.countTrueCases(check1), 0) &&
			   t.checkExpect(list2.countTrueCases(check1), 1) &&
			   t.checkExpect(list3.countTrueCases(check1), 2);
		       
	}
	
	boolean testFilter(Tester t){
		return t.checkExpect(list1.filterTrueCases(check1), mt) &&
		       t.checkExpect(list2.filterTrueCases(check1), list2) &&
			   t.checkExpect(list3.filterTrueCases(check1), list3expect);
	}
 //// TEST MORE TEST MORE TEST MORE	
}